home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: ua302aa@lrz-muenchen.de ()
- Newsgroups: comp.lang.c
- Subject: Re: Limit on #bytes inside of struct?
- Date: 9 Feb 1996 12:54:35 GMT
- Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
- Distribution: world
- Message-ID: <4ffg6b$ivd@sparcserver.lrz-muenchen.de>
- References: <4feg1d$d4g@cville-srv.wam.umd.edu>
- NNTP-Posting-Host: sun2.lrz-muenchen.de
-
- jsquires@wam.umd.edu (jeffrey d squires) writes:
-
- >I have the following:
-
- >typedef struct {
- > int zero;
- > int one;
- > int two;
- > int three;
- > int four;
- > int five;
- > int six;
- > int seven_or_more;
- >} hist_type;
-
- >hist_type histogram;
- >int num=2;
-
- >histogram.four = 0; /* at this point, value of num changes from 2 to 0!!!*/
-
- >Is there a limit on the number of bytes allowed inside of a struct?
-
- Yes, there is a limit on the number of bytes allowed in one
- object. That limit is 32k.
-
- >I am positive that the value of num changes from 2 before the last
- >assignment to 0 after it. Any ideas?
-
- Not really :-(. It you can post a minimal example that demonstrates
- this error, it might be possible to find the problem.
-
- >Is this a bug in gcc?
-
- Very improbable!
-
- >Unix?
-
- Even less probable, because the OS usually does not write into memory
- allocated for a user process without a good reason.
-
- Kurt
- --
- | Kurt Watzka Phone : +49-89-2180-6254
- | watzka@stat.uni-muenchen.de
- | ua302aa@sunmail.lrz-muenchen.de
-